import Vue from 'vue';
import App from './App.vue';
import router from './router';
import 'ant-design-vue/dist/antd.css';
import store from './store';
// 组件按需加载，在此引入
// eslint-disable-next-line import/order
import {
  Button, Drawer, List, Modal, Form, Input, message, Avatar, Icon
} from 'ant-design-vue';

const FormItem = Form.Item;
const { TextArea } = Input;
const ListItem = List.Item;
const ListItemMeta = List.Item.Meta;
const { confirm } = Modal;

Vue.use(Modal);

Vue.component(Button.name, Button);
Vue.component(Drawer.name, Drawer);
Vue.component(List.name, List);
Vue.component(Form.name, Form);
Vue.component(Input.name, Input);
Vue.component(FormItem.name, FormItem);
Vue.component(ListItem.name, ListItem);
Vue.component(TextArea.name, TextArea);
Vue.component(Avatar.name, Avatar);
Vue.component(ListItemMeta.name, ListItemMeta);
Vue.component(Icon.name, Icon);
Vue.config.productionTip = false;
Vue.prototype.$message = message;
Vue.prototype.$confirm = confirm;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
